home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
FontMancer
/
Common
/
AEHandler.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-06-21
|
1KB
|
39 lines
#include "AEHandler.h"
#include "Display.h"
extern Boolean gQuit;
extern Boolean gDManager;
void InitAEAccept()
{
long response;
OSErr error;
error = AEInstallEventHandler(kCoreEventClass,kAEOpenApplication,NewAEEventHandlerProc(AEHandleOpenApp),0,FALSE);
error = AEInstallEventHandler(kCoreEventClass,kAEOpenDocuments,NewAEEventHandlerProc(AEHandleOpenDoc),0,FALSE);
error = AEInstallEventHandler(kCoreEventClass,kAEPrintDocuments,NewAEEventHandlerProc(AEHandlePrint),0,FALSE);
error = AEInstallEventHandler(kCoreEventClass,kAEQuitApplication,NewAEEventHandlerProc(AEHandleQuit),0,FALSE);
if (gDManager)
error = InstallAEDMNotification();
}
pascal OSErr AEHandleOpenApp(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
{
return(noErr);
}
pascal OSErr AEHandleOpenDoc(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
{
return(noErr);
}
pascal OSErr AEHandlePrint(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
{
return(noErr);
}
pascal OSErr AEHandleQuit(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon)
{
gQuit = TRUE;
return(noErr);
}